package com.hjj.hello.spring.boot.service.impl;

import com.hjj.hello.spring.boot.domain.User;
import com.hjj.hello.spring.boot.mapper.UserMapper;
import com.hjj.hello.spring.boot.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper usermapper;
    @Override
    public User selectByUsername(String username) {
        User user = new User();
        user.setUsername(username);
        return usermapper.selectByUsername(user);
    }

    @Override
    public User selectById(Long userid) {
        User user = new User();
        user.setId(userid);
        return usermapper.selectById(user);
    }
}
